package com.panshi.service.impl;

import com.panshi.mapper.DynamicMapper;
import com.panshi.service.DynamicService;
import com.panshi.vo.DynamicVO;
import com.panshi.vo.PageSizeVO;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class DynamicServiceImpl implements DynamicService {

    @Resource
    private DynamicMapper dynamicMapper;

    @Override
   // @Cacheable(value = "personaldy",key = "#root.methodName+#did")
    public List<DynamicVO> findDyQuery(PageSizeVO pageSizeVO) {
        pageSizeVO.setStartIndex(pageSizeVO.getStartIndexInfo());
        return dynamicMapper.findDyQuery(pageSizeVO);
    }

    @Override
    public void deleteDy(int did) {
        dynamicMapper.deleteDy(did);
    }

    @Override
    public Integer queryusercount(Integer uid) {
        return dynamicMapper.queryusercount(uid);
    }
}
